<%@ page import="seedmarket.Admin" %>

<!-- will generate the form fields for each of the parameters in the admin class
	 each section will create a label, display a message and field -->

<div class="fieldcontain ${hasErrors(bean: adminInstance, field: 'fullName', 'error')} required">
	<label for="fullName">
		<g:message code="admin.fullName.label" default="Full Name" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="fullName" required="" value="${adminInstance?.fullName}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: adminInstance, field: 'gender', 'error')} ">
	<label for="gender">
		<g:message code="admin.gender.label" default="Gender" />
		
	</label>
	<g:select name="gender" from="${adminInstance.constraints.gender.inList}" value="${adminInstance?.gender}" valueMessagePrefix="admin.gender" noSelection="['': '']"/>
</div>

<div class="fieldcontain ${hasErrors(bean: adminInstance, field: 'birthDate', 'error')} required">
	<label for="birthDate">
		<g:message code="admin.birthDate.label" default="Birth Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="birthDate" precision="day"  value="${adminInstance?.birthDate}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: adminInstance, field: 'address', 'error')} required">
	<label for="address">
		<g:message code="admin.address.label" default="Address" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="address" required="" value="${adminInstance?.address}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: adminInstance, field: 'city', 'error')} required">
	<label for="city">
		<g:message code="admin.city.label" default="City" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="city" required="" value="${adminInstance?.city}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: adminInstance, field: 'state', 'error')} required">
	<label for="state">
		<g:message code="admin.state.label" default="State" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="state" required="" value="${adminInstance?.state}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: adminInstance, field: 'zipcode', 'error')} required">
	<label for="zipcode">
		<g:message code="admin.zipcode.label" default="Zipcode" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="zipcode" required="" value="${adminInstance?.zipcode}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: adminInstance, field: 'email', 'error')} ">
	<label for="email">
		<g:message code="admin.email.label" default="Email" />
		
	</label>
	<g:field type="email" name="email" value="${adminInstance?.email}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: adminInstance, field: 'userName', 'error')} required">
	<label for="userName">
		<g:message code="admin.userName.label" default="User Name" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="userName" required="" value="${adminInstance?.userName}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: adminInstance, field: 'password', 'error')} required">
	<label for="password">
		<g:message code="admin.password.label" default="Password" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="password" name="password" required="" value="${adminInstance?.password}"/>
</div>

